home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp95 / freyja13.exe / lha / FCALC.DOC < prev    next >
Text File  |  1992-03-22  |  14KB  |  528 lines

  1.               Freyja Calculator
  2.             HP-45A-like Calculator
  3.  
  4. DESIGN
  5.  
  6. This calculator is a non-programmable, scientific calculator, roughly
  7. equivalent to an HP-45A or a 41C with some functions missing.  It
  8. offers some extra functions (e.g., binary math).  The internal
  9. arithmetic is done using the C language "double" arithmetic supplied
  10. with your C compiler.
  11.  
  12. This documentation assumes that you already know all about RPN
  13. calculators in general and the HP calculators in particular.
  14.  
  15.  
  16.  
  17. ENTERING NUMBERS
  18.  
  19. Numbers look pretty much as you would expect.
  20.  
  21. - Real numbers can consist of the digits 0-9, a radix mark ('.' or
  22. ','), digit separators (the non-radix mark '.' or ','), an exponent
  23. character ('e' or 'E'), and an exponent.  Use the '~' or '`'
  24. characters (or F9) for entering negative numbers or exponents.
  25.  
  26. - Binary numbers start with a # sign, then contain the digits 0-9,
  27. a-f, or A-F.  They are interpreted and displayed according to the
  28. current default base.  They will also be masked to the current word
  29. size.
  30.  
  31. In all cases, number termination is by means of a space, ^G, ^M, ^J,
  32. ^[, $, %, *, +, -, or / character.
  33.  
  34. Some operators include the above termination characters as part of
  35. their names (e.g., "1/X").  You can enter these by starting the
  36. command with a single quote ("'").  Doing so disables the "immediate
  37. action" of the %, *, +, -, /, `, and ~ characters.
  38.  
  39. Numbers are converted between real and binary as needed (and expected)
  40. by the operators.  There are no illegal combinations, although there
  41. may be illegal values (e.g., square root of a negative number).
  42.  
  43.  
  44.  
  45. DISPLAY
  46.  
  47. Numbers are displayed according to their type and the current display
  48. settings.  These settings are:
  49.  
  50. - Real numbers: Std, Fix, Sci, Eng, the latter three requiring a 0-...
  51. number of digits (only Std is supported for now).  There are two other
  52. settings:
  53.  
  54.     radix mark        . or ,
  55.     digit separators shown    Y or N
  56.      (if Y, the separator is the one of , or . that is not the current
  57.      radix mark)
  58.  
  59. - Binary numbers: always displayed in the current base #XXXY, where Y
  60. is 'b', 'o', 'd', or 'h', designating Bin, Oct, Dec, and Hex modes.
  61.  
  62.  
  63.  
  64. STACK LIFT
  65.  
  66. The calculator handles stack lift more like an HP-28C/S or 48S/SX
  67. than a "normal" HP.  Number (and command name entry) is handled in a
  68. separate place and not the X register.  The entered number (or
  69. command) can be edited arbitrarily before it is terminated by a
  70. closing function that is actually executed.  Hence, the concept of
  71. stack lift does not play a very important role.  All operations leave
  72. stack lift enabled except for:
  73.  
  74.     CLX
  75.     ENTER^ (or T)
  76.     \GS+ (or ~+)
  77.     \GS- (or ~-)
  78.  
  79. No operations are neutral.
  80.  
  81.  
  82. COMMANDS
  83.  
  84. ^G    Exit calculator w/no action.
  85. ^H    Delete the preceeding character or clear X if no preceeding character.
  86. ^J    Exit calculator, inserting X into the buffer at the point.  Leave
  87.     the mark at the start of the number and the point at the start.
  88. ^M    Finish the current number or operator.
  89. ^[    Exit calculator w/no action.
  90. SP    Finish the current number or operator.
  91. $    Return to the editor.
  92. %    Percentage.
  93. '    Start a quoted command.
  94. *    Multiplication.
  95. +    Addition.
  96. -    Subtraction.
  97. /    Division.
  98. ^    Exponentiation.
  99. ?    Help.
  100. `    CHS or NEG.
  101. ~    CHS or NEG.
  102. ^?    Delete the preceeding character or clear X if no preceeding character.
  103.  
  104. MSDOS only:
  105.  
  106. F1    Help.
  107. F9    CHS or NEG.
  108. F10    Exit Freyja.
  109. Alt-B    Last X, immediate execute.
  110. Alt-C    X<>Y, immediate execute.
  111. Alt-L    CHS, immediate execute.
  112. Alt-M    RCL.
  113. Alt-N    STO.
  114. Alt-V    RDN, immediate execute.
  115. Alt-X    1/X, immediate execute.
  116. Alt-Z    SQRT, immediate execute.
  117.  
  118.  
  119. COMMAND LIST
  120.  
  121. These commands are all executed by typing their name, then completing
  122. them with a space, ^M, or ^J.  If a space is used as the terminator,
  123. it does not do an implied Enter.
  124.  
  125.     %%%    register designator:
  126.             #        numeric
  127.             X,Y,Z,T,L    stack
  128.             A        alpha
  129.             \GS,~        summation
  130.             .%%%        indirect
  131.             IND%%%        indirect
  132.     ###    number
  133.     &&&    label:
  134.             #        numeric
  135.             "string"    alpha label
  136.             .###        indirect
  137.     @@@    buffer name
  138.  
  139. name        does
  140.  
  141. %        percent
  142. %CH        percent change
  143. %TOT        percent of total
  144. *        multiply
  145. +        add
  146. -        subtract
  147. /        divide
  148. 1/X        inverse (not typable: must use INV)
  149. 10^X        common exponent (not typable: must use ALOG)
  150. <%%%        recall
  151. >%%%        store
  152. ABS        absolute value
  153. ACOS        arc cosine
  154. ALOG        common exponent
  155. AND        bitwise and
  156. ASIN        arc sin
  157. ATAN        arc tangenet
  158. B        set binary mode
  159. CF###        clear flag
  160. CLRG        clear registers
  161. CLST        clear stack
  162. CLX        clear x
  163. CL\GS    CL~    clear summation
  164. COS        cosine
  165. D        set decimal mode
  166. D-R        convert degrees to radians
  167. DATE-        subtract the number of days in X to date in Y using the current
  168.         calenndar
  169. DATE+        add the number of days in X to date in Y using the current
  170.         calenndar
  171. DATE        return the current date
  172. DDAYS        compute the number of days between two dates using the current
  173.         calenndar
  174. DEC        convert octal to decimal
  175. DEFAULT        restore default settings
  176. DEG        set degrees mode
  177. DIGSEPOFF    set the digit separator mark to not displayed
  178. DIGSEPON    set the digit separator mark to displayed
  179. DMY        set D.MY mode
  180. DOW        figure the day of the week for a date (0=Sunday)
  181. ENTER^        enter
  182. E^X        natural exponent
  183. E^X-1        natural exponent - 1
  184. FACT        factorial
  185. FRC        fractional part
  186. GRAD        set grads mode
  187. H        set hexadecimal mode
  188. HELP        help
  189. HMS-        subtract two times in H.MS notation
  190. HMS+        add two times in H.MS notation
  191. HMS        convert decimal hours to H.MS
  192. HR        convert H.MS to decimal hours
  193. INT        integer part
  194. INV        inverse
  195. L        recall last x
  196. LASTX        recall last x
  197. LN        natural logarithm
  198. LN1+X        natural logarithm + 1
  199. LOG        common logarithm
  200. MDY        set M.DY mode
  201. MEAN        average
  202. MEMLOAD        ask for a filename and load memory from that file
  203. MEMSAVE        ask for a feilename and save memory to that file
  204. MEMVIEW        view interpreted calculator memory in %calc% buffer
  205. MEM\GS        view interpretad summation memory in %calc% buffer
  206. MEM~        view interpretad summation memory in %calc% buffer
  207. MOD        modulus
  208. NEG        negate
  209. NOT        bitwise not
  210. NULL        no op
  211. O        set octal mode
  212. OCT        convert decimal to octal
  213. OR        bitwise or
  214. P-R        convert polar to rectangular
  215. PI        constant pi
  216. R        roll down
  217. R-D        convert radians to degrees
  218. R-P        convert rectangular to polar
  219. RAD        set radians mode
  220. RADIX,        set the radix mark to ,
  221. RADIX.        set the radix mark to .
  222. RCL%%%        recall (try rcl~78)
  223. RDN        roll down
  224. R^        roll up
  225. S        swap: x<>y
  226. SDEV        standard deviation
  227. SF###        set flag
  228. SIGN        sign of number
  229. SIN        sin
  230. SQRT        square root
  231. ST%%%        store
  232. STD        set display all digits notation
  233. STO%%%        store
  234. T        enter
  235. TAN        tangent
  236. TIME        return the current time
  237. TRACEOFF    turn trace mode off
  238. TRACEON        turn trace mode on
  239. WSIZE        set the word size
  240. WSIZE?        get the word size
  241. X360        set calendar mode to 360 day calendar
  242. X365        set calendar mode to 365 day calendar
  243. X<>%%%        swap with
  244. XACTUAL        set calendar mode to actual calendar
  245. XCAL        generates a calendar for the specified month in the %cal%
  246.         buffer
  247. XCALD        moves the calendar by X months
  248. XEQ@@@        switches input to the specified buffer (sort of like
  249.         executing a program)
  250. XOR        bitwise xor
  251. XRND        takes an argument from the stack (small integer) and
  252.         rounds the number to that number of decimal places
  253. XROOT        xth root of y
  254. X^2        square
  255. Y^X        exponentiation
  256. \GD%        delta %
  257. \GS+    ~+    summation plus
  258. \GS-    ~-    summation minus
  259. \GSREG    ~REG    set summation register
  260. \GSREG?    ~REG?    what is summation register pointer
  261. ^        exponentiation
  262.  
  263.  
  264.  
  265. CALCUALTOR-RELATED FREYJA COMMANDS
  266.  
  267. ^[ ^A    Mark the current number (mark to start, point to end).
  268. ^[ ^B    Move backward one number.
  269. ^[ ^E    Mark the current number and enter it into the calculator.
  270. ^[ ^F    Move forward one number.
  271. ^[ ^M    Insert a printed copy of the number in the X register into the
  272.     buffer.  If an argument is supplied, do ^[ ^A ^W first.
  273. ^[ ^U    Invoke the calculator.
  274. ^[  ^]    Load the program specified by the argument into the keyboard macro.
  275.  
  276.  
  277.  
  278. SYSTEM BUFFERS USED
  279.  
  280. %alpha%        the alpha register
  281. %cal%        calendar output
  282. %calc%        miscellaneous calculator output (e.g., status dump)
  283. %print%        printer output (not cleared before use)
  284. %trace%        trace output (not cleared before use)
  285.  
  286.  
  287.  
  288. FREYJA-LOCAL FLAGS
  289.  
  290. start    size    default    use
  291.  
  292. 65    8    BINSIZE    word size for binary integers
  293.  
  294. 73    2    hex    binary number mode:
  295.  
  296.     flag    74    73
  297.         0    0    decimal 
  298.         0    1    octal
  299.         1    0    binary
  300.         1    1    hexadecimal
  301.  
  302. 75    2    uns    complement mode
  303.             (not implemented)
  304.  
  305.     flag    76    75
  306.         0    0    unsigned
  307.         0    1    1's
  308.         1    0    2's
  309.         1    1    unsigned (don't use)
  310.  
  311. 77    2    actual    calendar mode
  312.  
  313.     flag    78    77
  314.         0    0    360 day
  315.         0    1    actual
  316.         1    0    365 day
  317.         1    1    actual (don't use)
  318.  
  319. 78    2    unused
  320.  
  321. 81    16    11    summation base register
  322.  
  323. 97    1    0    if set, commands must be entered in upper case
  324.  
  325. 98    1    0    if set, the program is assumed to *not* contain
  326.             line numbers: if present, they will be interpeted.
  327.             line numbers are of the form:
  328.                 0 or 1 space characters
  329.                 2-4 digit characters
  330.                 1 space character or 1 label marker
  331.             (not implemented)
  332.  
  333. 99    1    0    if set, the alpha register will be truncated to
  334.             24 bytes after every alpha operation
  335.             (not implemented)
  336.  
  337. 100    1    0    if set, filenames will be truncated to 7 characters
  338.             before being used
  339.             (not implemented)
  340.  
  341.  
  342.  
  343. SAVING MEMORY
  344.  
  345. Calculator memory can be saved with the MEMSAVE command.  You are
  346. asked for a file name and all memory (registers, flags, stack, etc.)
  347. is saved to the specified file.  A file's contents can be loaded with
  348. the MEMLOAD command.
  349.  
  350.  
  351.  
  352. PROGRAMS
  353.  
  354. A program is created by means of the ^X ( and ^X ) commands.  This
  355. program can be saved the ^[ ^] command.  This command inserts the
  356. current keyboard macro contents at the point.  You can then use normal
  357. editing commands to manpulate and save it.
  358.  
  359. The typical sequence is:
  360.  
  361.     - create a keyboard macro
  362.     - create an empty buffer
  363.     - give the ^[ ^] command
  364.     - save the buffer
  365.  
  366. You now have your program saved.  You can execute it in one of two ways:
  367.  
  368. 1:    - find the file with your program
  369.     - XEQ<name>
  370.  
  371. 2:    - find the file with your program
  372.     - give the ^U ^[ ^] command to copy the buffer to the keyboard macro
  373.     - execute it with ^]
  374.  
  375. The second method allows you to give a repeat count.
  376.  
  377.  
  378.  
  379. LATER
  380.  
  381. 41CX functions to be done later (??? don't know the character code(s) yet). 
  382. These are basically the alpha register, program control, extended memory,
  383. alarm, and other specialized functions.
  384.  
  385. ADATE        date to alpha
  386. ADV        paper advance
  387. ALEN        length of alpha
  388. ALMCAT        alarm catalog
  389. ALMNOW        activate oldest alarm
  390. ANUM        number in alpha to x
  391. AOFF        alpha keyboard off
  392. AON        alpha keyboard off
  393. APPCHR        append char to record
  394. APPREC        append record to file
  395. ARCL        recall alpha
  396. ARCLREC        append record to alpha
  397. AROT        rotate alpha
  398. ASHF        alpha shift
  399. ASROOM        bytes available in file
  400. ASTO%%%        alpha store
  401. ATIME        time to alpha
  402. ATIME24        time in 24 hour clock to alpha
  403. ATOX        left byte of alpha to x
  404. AVIEW        alpha view
  405. BEEP        beep
  406. CAT###        catalogs
  407. CLA        clear alpha
  408. CLALMA        clear alarm in alpha
  409. CLALMX        clear alarm in x
  410. CLD        clear display
  411. CLFL        clear file
  412. CLK12        12 hour clock mode
  413. CLK24        24 hour clock mode
  414. CLKEYS        clear keys
  415. CLKT        display time
  416. CLKTD        display time and date
  417. CLOCK        display running clock
  418. CLP        clear programn
  419. CLRALMS        clear alarms
  420. CLRGX        clear registers according to x
  421. COPY        copy program
  422. CORRECT        correct the time
  423. CRFLAS        create text file
  424. CRFLD        create data file
  425. DELCHR        delete char from record
  426. DELREC        delete record from file
  427. DSE        decrement and skip if equal
  428. ED        invoke editor
  429. EMDIR        extended memory directory
  430. EMDIRX        extended memory directory of Xth file
  431. EMROOM        room in extended memory
  432. END        end program
  433. ENG###        engineering notation
  434. F###        function (soft, menu) key ###
  435. FC?###        is flag clear
  436. FC?C###        is flag clear and clear
  437. FLSIZE        return file size
  438. FIX###        fixed notation
  439. FS?###        is flag set
  440. FS?C###        is flag set and clear
  441. GETAS        get file
  442. GETKEY        get a key
  443. GETKEYX        get a key timed
  444. GETP        get program
  445. GETR        get registers
  446. GETREC        get record
  447. GETRX        get a registers according to X
  448. GETSUB        get a subroutine
  449. GETX        get a register
  450. GTO&&&        goto
  451. INSCHR        insert a char into a record
  452. INSREC        insert a record into a file
  453. ISG        increment and skip if greater
  454. LBL&&&        label (.### not allowed, printed listings
  455.         always prefixed with a 206 (octal) character)
  456. OFF        turn off
  457. ON        turn on
  458. PACK        pack memory
  459. PASN        programmable key assingment
  460. PCLPS        programmable clear program
  461. POSA        find position in alpha
  462. POSFL        find position in file
  463. PROMPT        display a prompt
  464. PSE        pause
  465. PSIZE        program size
  466. PURFL        purge file
  467. RCLAF        recall clock accuracy
  468. RCLALM        recall alarm
  469. RCLFLAG        recall flags
  470. RCLPT        recall file pointer
  471. RCLPTA        recall file pointer according to alpha
  472. RCLSW        recall stopwatch
  473. REGMOVE        move register block
  474. REGSWAP        swap register block
  475. RESZFL        change file size
  476. RND        round
  477. RTN        return
  478. RUNSW        run stopwatch
  479. SAVEAS        save text file
  480. SAVEP        save program
  481. SAVER        save registers
  482. SAVERX        save registers according to x
  483. SAVEX        save a register
  484. SCI###        scientific notation
  485. SEEKPT        see a file
  486. SEEPTA        see a file according to alpha
  487. SETAF        set clock accuracy factor
  488. SETDATE        set date
  489. SETIME        set time
  490. SETSW        set stopwatch
  491. SIZE###        set curtain
  492. SIZE?        what is curtain
  493. STOFLAG        store flags
  494. STOP        stop
  495. STOPSW        stop the stopwatch
  496. SW        invoke the stopwatch
  497. SWPT        set stopwatch register pointer
  498. T+X        adjust clock
  499. TONE###        tone
  500. VIEW%%%        view
  501. X!=%%%?    X\035%%%?  compare
  502. X!=0?    X\0350?    compare
  503. X!=Y?    X\035Y?    compare
  504. X<%%%?        compare
  505. X<0?        compare
  506. X<Y?        compare
  507. X<=%%%?        compare
  508. X<=0?        compare
  509. X<=Y?        compare
  510. X<>F        swap X and flags
  511. X<>Y        swap
  512. X=%%%?        compare
  513. X=0?        compare
  514. X=Y?        compare
  515. X>%%%?        compare
  516. X>0?        compare
  517. X>Y?        compare
  518. X>=%%%?        compare
  519. X>=0?        compare
  520. X>=Y?        compare
  521. XEQ&&&        subroutine call
  522. XROM###,###    xrom call
  523. XTOA        x to left byte of alpha
  524. XYZALM        set specified alarm
  525.     ???    append
  526.  
  527. Plus the TVM functions and fractions (a la the 32SII).
  528.